package com.cory.module.msg.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author xiongcong
 * @date 2022-09-18
 */
@Configuration
@ConditionalOnProperty(prefix = "admin.msg", value = "name")
public class AdminMsgConfiguration {
    
    @Autowired
    private AdminMsgService adminMsgService;
    
    @Scheduled(fixedDelay = 1000 * 60, initialDelay = 5000)
//    @PostConstruct
    public void init() {
        adminMsgService.initPlatformAdminMsg();
    }

}
